package com.wolfking.jeesite.sso;

import com.wolfking.jeesite.service.DictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SsoConfigService {

    @Autowired
    private DictService dictService;


    public String getSsoLoginInfo() {
        return dictService.getSsoConfig("sso_login_info", "");
    }

    public String getSsoLogout() {
        return dictService.getSsoConfig("sso_logout", "");
    }

    public boolean getLogoutRedirectSsoLogout() {
        return Boolean.parseBoolean(dictService.getSsoConfig("logout_redirect_sso_logout", "true"));
    }

    public String getSsoLoginUrl() {
        return dictService.getSsoConfig("sso_login_url", "");
    }


    public String getSsoRegisterRoles() {
        return dictService.getSsoConfig("sso_register_roles", "");
    }
}
